ipv6: raw: Deduct extension header length in rawv6_push_pending_frames
authorHerbert Xu <herbert@gondor.apana.org.au>
Tue, 10 Jan 2023 00:59:06 +0000 (08:59 +0800)
committerSalvatore Bonaccorso <carnil@debian.org>
Sat, 21 Jan 2023 14:35:48 +0000 (14:35 +0000)
commit3c91dca66e2386bf043ce77c62f86aad7a462033
treea517a61502c0188ca5e22dcde80914789f664922
parent50ea5b78666e3482aa357d01c539bca1ee93af21
ipv6: raw: Deduct extension header length in rawv6_push_pending_frames

Origin: https://git.kernel.org/linus/cb3e9864cdbe35ff6378966660edbcbac955fe17
Bug-Debian-Security: https://security-tracker.debian.org/tracker/CVE-2023-0394

The total cork length created by ip6_append_data includes extension
headers, so we must exclude them when comparing them against the
IPV6_CHECKSUM offset which does not include extension headers.

Reported-by: Kyle Zeng <zengyhkyle@gmail.com>
Fixes: 357b40a18b04 ("[IPV6]: IPV6_CHECKSUM socket option can corrupt kernel memory")
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
Gbp-Pq: Topic bugfix/all
Gbp-Pq: Name ipv6-raw-Deduct-extension-header-length-in-rawv6_pus.patch
net/ipv6/raw.c